Skip to content

Unsafe evolution: fix a race in version decoding - #85131

Merged
333fred merged 1 commit into
dotnet:mainfrom
jjonescz:Unsafe-51-VersionDecodingRace
Sep 2, 2026
Merged

Unsafe evolution: fix a race in version decoding#85131
333fred merged 1 commit into
dotnet:mainfrom
jjonescz:Unsafe-51-VersionDecodingRace

Conversation

@jjonescz

@jjonescz jjonescz commented Sep 2, 2026

Copy link
Copy Markdown
Member

Fixes #85130.
Test plan: #81207
Follow up on #84860.

Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The concurrency fix needs a regression test covering parallel first access.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes a race when caching decoded memory-safety rules for C# metadata modules.

Changes:

  • Replaces nullable caching with thread-safe SingleInitNullable.
  • Preserves decoding behavior using a non-capturing factory.
File summaries
File Description
PEModuleSymbol.cs Makes version caching thread-safe.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/Compilers/CSharp/Portable/Symbols/Metadata/PE/PEModuleSymbol.cs
@333fred
333fred merged commit 056f613 into dotnet:main Sep 2, 2026
23 checks passed
chsienki added a commit to chsienki/roslyn that referenced this pull request Sep 2, 2026
Picks up dotnet#85131 (fix a race in version decoding), which resolves the
CS9103 MemorySafetyRulesAttribute version-decoding errors that failed the VS
insertion CloudBuild. Clean merge, no conflicts.
@jjonescz
jjonescz deleted the Unsafe-51-VersionDecodingRace branch September 3, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Known Build Error] Unrecognized MemorySafetyRulesAttribute version

3 participants